﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Model
{
    [ObjectEvent]
    public class Features_FastComponentEvent : ObjectEvent<Features_FastComponent>, IAwake
    {
        public void Awake()
        {
            Get().Awake();
        }
    }
    public class Features_FastComponent : BattleEventComponent
    {
        public override BattleEventType[] EventType { get; set; } = new BattleEventType[] { BattleEventType.TakeAttack, BattleEventType.FightEnd };

        public override async Task RunEvent(BattleEventType eventType, FightModel fightModel, params object[] param)
        {
            if (eventType == BattleEventType.TakeAttack)
            {
                fightModel.TrapUseAble = false;
            }
            if (eventType == BattleEventType.FightEnd)
            {
                fightModel.TrapUseAble = true;
            }
        }
    }
}
